package wapbean;

import common.DBHandle;

public class StoryContentBean {
	
	  private String Storyid;
	  private String StoryName;
	  private String StoryResource;
	  private String StoryImgName;
	  private String StoryDescription;
	  private String contentId;
	  private String CreateDate;
	  private String storytypeid;
	  private String storytypename;
	public String getStorytypeid() {  
		return storytypeid;
	}
	public void setStorytypeid(String storytypeid) {  
		this.storytypeid = storytypeid;
	}
	public String getStorytypename() {
		return storytypename;
	}
	public void setStorytypename(String storytypename) {
		this.storytypename = storytypename;
	}
	public String getContentId() {
		return contentId;
	}
	public void setContentId(String contentId) {  
		this.contentId = contentId;
	}
	public String getStoryid() {
		return Storyid;
	}
	public void setStoryid(String storyid) {
		Storyid = storyid;
	}
	public String getStoryName() {
		return StoryName;
	}
	public void setStoryName(String storyName) {
		StoryName = storyName;
	}
	public String getStoryResource() {
		return StoryResource;
	}
	public void setStoryResource(String storyResource) {
		StoryResource = storyResource;
	}
	public String getStoryImgName() {
		return StoryImgName;
	}
	public void setStoryImgName(String storyImgName) {
		StoryImgName = storyImgName;
	}
	public String getStoryDescription() {
		return StoryDescription;
	}
	public void setStoryDescription(String storyDescription) {
		StoryDescription = storyDescription;
	}
	public String getCreateDate() {
		return CreateDate;
	}
	public void setCreateDate(String createDate) {
		CreateDate = createDate;
	}
	 public void intoStoryLog() {  
                    if(contentId==null||contentId.equals("null")){      
		   String sql ="insert into StoryLog(Storyid,contentId,CreateDate)values('"+this.Storyid+"','00000','"+this.CreateDate+"')";
		  System.out.println("story");
		  System.out.println(sql);
		   DBHandle.updateSql(sql);  
                    }
              else{
                String sql ="insert into StoryLog(Storyid,contentId,CreateDate)values('"+this.Storyid+"','"+this.contentId+"','"+this.CreateDate+"')";
                System.out.println("story");
                System.out.println(sql);
     		   DBHandle.updateSql(sql);    
                 }
		  

}
}
